package com.tz.farmer.controller;

import com.smartPark.msframe.result.ResultEx;
import com.tz.farmer.service.WebSweepCodeRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 *  扫码记录
 */
@Api(tags = "扫码记录-web")
@Slf4j
@RestController
@RequestMapping("/codeRecord")
public class WebSweepCodeRecordController {

     @Resource
     WebSweepCodeRecordService webSweepCodeRecordService;

    /**
     * 添加查询列表
     * @param
     * @return
     */
    @GetMapping("/listConditions")
    @ApiOperation("条件查询列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "flag", value = "0:农 1：渔", dataType = "int", defaultValue = "", required = true),
            @ApiImplicitParam(name = "keyword", value = "关键字", dataType = "string", defaultValue = "", required = false),
            @ApiImplicitParam(name = "releaseTime", value = "时间", dataType = "string", defaultValue = "", required = false),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", defaultValue = "", required = true),
            @ApiImplicitParam(name = "currentPage", value = "每页条数", dataType = "int", defaultValue = "", required = true)
    })
    public ResultEx getSweepCodeRecordListByConditions(){
        return webSweepCodeRecordService.getSweepCodeRecordListByConditions();
    }

}
